Skip to content

gh-101100: Fix Sphinx warnings in turtle module#102340

Merged
hugovk merged 5 commits intopython:mainfrom
hugovk:docs-fix-turtle-warnings
Mar 13, 2023
Merged

gh-101100: Fix Sphinx warnings in turtle module#102340
hugovk merged 5 commits intopython:mainfrom
hugovk:docs-fix-turtle-warnings

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Feb 28, 2023

Fixes 36 Sphinx warnings.

Before

$ make html SPHINXERRORHANDLING=-n 2>&1 | grep turtle.rst | tee >(wc -l)
/Users/hugo/github/cpython/Doc/library/turtle.rst:58: WARNING: py:class reference target not found: tkinter.Canvas
/Users/hugo/github/cpython/Doc/library/turtle.rst:75: WARNING: py:class reference target not found: Pen
/Users/hugo/github/cpython/Doc/library/turtle.rst:1547: WARNING: py:meth reference target not found: addcomponent
/Users/hugo/github/cpython/Doc/library/turtle.rst:2111: WARNING: py:class reference target not found: tkinter.Canvas
/Users/hugo/github/cpython/Doc/library/turtle.rst:2126: WARNING: py:class reference target not found: tkinter.Canvas
/Users/hugo/github/cpython/Doc/library/turtle.rst:2128: WARNING: py:func reference target not found: setbg
/Users/hugo/github/cpython/Doc/library/turtle.rst:2343: WARNING: py:meth reference target not found: Screen.setup
/Users/hugo/github/cpython/Doc/library/turtle.rst:2345: WARNING: py:meth reference target not found: Screen.screensize
/Users/hugo/github/cpython/Doc/library/turtle.rst:2407: WARNING: py:func reference target not found: tracer
/Users/hugo/github/cpython/Doc/library/turtle.rst:2407: WARNING: py:func reference target not found: update
/Users/hugo/github/cpython/Doc/library/turtle.rst:2419: WARNING: py:func reference target not found: ondrag
/Users/hugo/github/cpython/Doc/library/turtle.rst:2436: WARNING: py:func reference target not found: onclick
/Users/hugo/github/cpython/Doc/library/turtle.rst:2442: WARNING: py:func reference target not found: stamp
/Users/hugo/github/cpython/Doc/library/turtle.rst:2445: WARNING: py:class reference target not found: Vec2D
/Users/hugo/github/cpython/Doc/library/turtle.rst:2448: WARNING: py:func reference target not found: clone
/Users/hugo/github/cpython/Doc/library/turtle.rst:2448: WARNING: py:func reference target not found: undo
/Users/hugo/github/cpython/Doc/library/turtle.rst:2458: WARNING: py:func reference target not found: clone
/Users/hugo/github/cpython/Doc/library/turtle.rst:2464: WARNING: py:func reference target not found: circle
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:meth reference target not found: Turtle.tracer
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:meth reference target not found: Turtle.window_width
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:meth reference target not found: Turtle.window_height
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:class reference target not found: Screen
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:class reference target not found: TurtleScreen
/Users/hugo/github/cpython/Doc/library/turtle.rst:2472: WARNING: py:class reference target not found: Screen
/Users/hugo/github/cpython/Doc/library/turtle.rst:2480: WARNING: py:meth reference target not found: Turtle.fill
/Users/hugo/github/cpython/Doc/library/turtle.rst:2480: WARNING: py:meth reference target not found: begin_fill
/Users/hugo/github/cpython/Doc/library/turtle.rst:2480: WARNING: py:meth reference target not found: end_fill
/Users/hugo/github/cpython/Doc/library/turtle.rst:2485: WARNING: py:meth reference target not found: Turtle.filling
/Users/hugo/github/cpython/Doc/library/turtle.rst:2493: WARNING: py:meth reference target not found: Turtle.shearfactor
/Users/hugo/github/cpython/Doc/library/turtle.rst:2493: WARNING: py:meth reference target not found: Turtle.shapetransform
/Users/hugo/github/cpython/Doc/library/turtle.rst:2493: WARNING: py:meth reference target not found: Turtle.get_shapepoly
/Users/hugo/github/cpython/Doc/library/turtle.rst:2493: WARNING: py:meth reference target not found: Turtle.tiltangle
/Users/hugo/github/cpython/Doc/library/turtle.rst:2493: WARNING: py:meth reference target not found: Turtle.settiltangle
/Users/hugo/github/cpython/Doc/library/turtle.rst:2500: WARNING: py:meth reference target not found: Screen.onkeypress
/Users/hugo/github/cpython/Doc/library/turtle.rst:2500: WARNING: py:meth reference target not found: Screen.onkey
/Users/hugo/github/cpython/Doc/library/turtle.rst:2500: WARNING: py:meth reference target not found: Screen.onkeyrelease
/Users/hugo/github/cpython/Doc/library/turtle.rst:2504: WARNING: py:meth reference target not found: Screen.mainloop
/Users/hugo/github/cpython/Doc/library/turtle.rst:2504: WARNING: py:func reference target not found: mainloop
/Users/hugo/github/cpython/Doc/library/turtle.rst:2508: WARNING: py:meth reference target not found: Screen.textinput
/Users/hugo/github/cpython/Doc/library/turtle.rst:2508: WARNING: py:meth reference target not found: Screen.numinput
      40

After

$ make html SPHINXERRORHANDLING=-n 2>&1 | grep turtle.rst | tee >(wc -l)
/Users/hugo/github/cpython/Doc/library/turtle.rst:58: WARNING: py:class reference target not found: tkinter.Canvas
/Users/hugo/github/cpython/Doc/library/turtle.rst:75: WARNING: py:class reference target not found: turtle.Pen
/Users/hugo/github/cpython/Doc/library/turtle.rst:2111: WARNING: py:class reference target not found: tkinter.Canvas
/Users/hugo/github/cpython/Doc/library/turtle.rst:2126: WARNING: py:class reference target not found: tkinter.Canvas
       4

I think the tkinter.Canvas ones are valid because I don't see Canvas in https://github.com/python/cpython/blob/main/Doc/library/tkinter.rst

And I'm not sure how to deal with turtle.Pen, it's defined like:

Pen = Turtle

where:

class Turtle(RawTurtle):

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants